package com.study.servlet;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * @Description :
 * @Author : guxuemin
 * @Version : V1.0.0
 * @Date : 2022/9/21 15:55
 */
public class MyFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("my filter begin ...");
        chain.doFilter(request, response);
        System.out.println("my filter end ...");
    }

    @Override
    public void destroy() {

    }
}
